package com.itheima.web;

import com.itheima.pojo.User;
import com.itheima.service.UserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserConcroller {
    @DubboReference
    UserService userService;
    @GetMapping("add/{name}/{email}")
    public void addUser(@PathVariable("name")String name,@PathVariable("email") String email ){
        User user =new User();
        user.setName(name);
        user.setEmail(email);
        Boolean flag = userService.AddUser(user);

    }
}
